package com.erp.erp_entitys.bill_declare;

import com.erp.erp_entitys.business.entity.CarryDetailProductEntity;
import com.erp.erp_entitys.business.entity.CarryDetailProductPartsEntity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 报关产品明细表(BillDeclareProductInfo)实体类
 *
 * @author cj
 * @since 2021-01-10 11:14:14
 */
public class BillDeclareProductInfo implements Serializable {
    private static final long serialVersionUID = 643438532344195169L;
    /**
     * 报关产品表ID
     */
    private Integer declareProductId;
    /**
     * 报关主表ID
     */
    private Integer declareId;
    /**
     * 规格编码
     */
    private String specCode;
    /**
     * 出运产品主id
     */
    private Integer carryProductsId;
    /**
     * 出运配件主id
     */
    private Integer carryPartsId;
    /**
     * 规格说明
     */
    private String specNo;
    /**
     * 产品编码
     */
    private String goodsCode;
    /**
     * 产品条码
     */
    private String goodBarcode;
    /**
     * 产品中文名称
     */
    private String goodsCname;
    /**
     * 产品英文名称
     */
    private String goodsEname;
    /**
     * 产品中文描述
     */
    private String goodsCdesc;
    /**
     * 产品英文描述
     */
    private String goodsEdesc;
    /**
     * 产品数量
     */
    private BigDecimal goodsNum;
    /**
     * 剩余数量
     */
    private BigDecimal lastAmount;
    /**
     * 单位
     */
    private String goodsUnit;
    /**
     * 规格说明
     */
    private String goodsSpec;
    /**
     * 颜色
     */
    private String color;
    /**
     * 箱数(件数)
     */
    private BigDecimal piecesNum;
    /**
     * 每箱数量（每件数量）
     */
    private BigDecimal perpiecesNum;
    /**
     * 毛重
     */
    private BigDecimal goodsGross;
    /**
     * 毛重小计
     */
    private BigDecimal totalGross;
    /**
     * 净重
     */
    private BigDecimal netweight;
    /**
     * 净重小计
     */
    private BigDecimal totalnet;
    /**
     * 体积
     */
    private BigDecimal bulk;
    /**
     * 体积小计
     */
    private BigDecimal totalBulk;
    /**
     * 外币单价（单价）
     */
    private BigDecimal funitprice;
    /**
     * 外币金额小计（金额小计）
     */
    private BigDecimal ftotalprice;
    /**
     * 托盘入数
     */
    private BigDecimal trayNumber;
    /**
     * 总托盘
     */
    private BigDecimal totalTray;
    /**
     * 采购单号
     */
    private String stockNo;
    /**
     * 销售合同号
     */
    private String saleContractNo;
    /**
     * 客户合同号
     */
    private String clientContractNo;
    /**
     * 供应商编码
     */
    private String supplyerId;
    /**
     * 供应商名称
     */
    private String supplyerName;
    /**
     * 产品类型(1:成品 2:配件 )
     */
    private Integer producttype;
    /**
     * 海关编码
     */
    private String hsCode;
    /**
     * 报关中文品名
     */
    private String billGoodsCname;
    /**
     * 报关英文品名
     */
    private String billGoodsEname;
    /**
     * 报关要素
     */
    private String hsMemo;
    /**
     * 增值税率
     */
    private BigDecimal addRate;
    /**
     * 退税率
     */
    private BigDecimal backRate;
    /**
     * 采购单价
     */
    private BigDecimal stockPrice;
    /**
     * 报关单价
     */
    private BigDecimal declarePrice;
    /**
     * 报关小计
     */
    private BigDecimal totalPrice;
    /**
     * 外包装长
     */
    private BigDecimal outerLenght;
    /**
     * 外包装宽
     */
    private BigDecimal outerWidth;
    /**
     * 外包装高
     */
    private BigDecimal outerHeight;
    /**
     * 外包装数量
     */
    private BigDecimal outerPiece;
    /**
     * 外包装单位
     */
    private String outerPackageUnit;
    /**
     * 成本单价（默认导入出运明细产品采购单价，但是可能会调整，所以保存）
     */
    private BigDecimal costUnitPrice;
    /**
     * 成本小计（报关数量*成本单价）
     */
    private BigDecimal costSubtotal;


    public BillDeclareProductInfo() {
    }

    public BillDeclareProductInfo(CarryDetailProductEntity pro) {//产品表
        this.costUnitPrice=pro.getCostUnitPrice();
        this.costSubtotal=pro.getCostSubtotal();
        this.specCode = pro.getSpecNo();
        this.carryProductsId = pro.getId();
        this.specNo = pro.getProductSpecExplanation();
        this.goodsCode = pro.getProductCode();
        this.goodsCname = pro.getProductCname();
        this.goodsEname = pro.getProductEname();
        this.goodsCdesc = pro.getProductCdesc();
        this.goodsEdesc = pro.getProductEdesc();
        this.goodsNum = pro.getProductNum();
        this.goodsUnit = pro.getProductUnitName();
        this.goodsSpec = pro.getProductSpecExplanation();
        this.color = pro.getColor();
        this.piecesNum = pro.getBoxAmount();
        this.perpiecesNum = pro.getEveryBoxAmount();
        this.goodsGross = pro.getGrossWeight();
        this.totalGross = pro.getGrossWeightSubtotal();
        this.netweight = pro.getNetWeight();
        this.totalnet = pro.getNetWeightSubtotal();
        this.bulk = pro.getBulk();
        this.totalBulk = pro.getBulkSubtotal();
        this.funitprice = pro.getFcUnitPrice();
        this.ftotalprice = pro.getMoneySubtotal();
        this.trayNumber = pro.getTrayNumber();
        this.totalTray = pro.getTotalTray();
        this.stockNo = pro.getPurchaseNo();
        this.saleContractNo = pro.getSaleContractNo();
        this.clientContractNo = pro.getClientContractNo();
        this.supplyerId = pro.getSupplierId();
        this.supplyerName = pro.getSupplierName();
        this.producttype = 1;
        this.stockPrice = pro.getFinishedProductCost();
        this.outerLenght = pro.getOuterPackingLong();
        this.outerWidth = pro.getOuterPackingWide();
        this.outerHeight = pro.getOuterPackingHeight();
        this.outerPackageUnit = pro.getOuterPackingUnit();
    }

    public BillDeclareProductInfo(CarryDetailProductPartsEntity part) {
        this.carryPartsId=part.getId();
        this.specCode = part.getSpecNo();
        this.goodsCode = part.getPartsCode();
        this.goodsCname = part.getProductCname();
        this.goodsEname = part.getProductEname();
        this.goodsNum = part.getPartsAmount();
        this.goodsGross = part.getGrossWeight();
        this.netweight = part.getNetWeight();
        this.bulk = part.getBulk();
        this.stockNo = part.getContractPurchaseNumber();
        this.supplyerId = part.getSupplierId();
        this.supplyerName = part.getSupplierName();
        this.producttype = 2;
        this.stockPrice = part.getCostUnitPrice();
    }

    public BigDecimal getCostUnitPrice() {
        return costUnitPrice;
    }

    public void setCostUnitPrice(BigDecimal costUnitPrice) {
        this.costUnitPrice = costUnitPrice;
    }

    public BigDecimal getCostSubtotal() {
        return costSubtotal;
    }

    public void setCostSubtotal(BigDecimal costSubtotal) {
        this.costSubtotal = costSubtotal;
    }

    public Integer getDeclareProductId() {
        return declareProductId;
    }

    public void setDeclareProductId(Integer declareProductId) {
        this.declareProductId = declareProductId;
    }

    public Integer getDeclareId() {
        return declareId;
    }

    public void setDeclareId(Integer declareId) {
        this.declareId = declareId;
    }

    public String getSpecCode() {
        return specCode;
    }

    public void setSpecCode(String specCode) {
        this.specCode = specCode;
    }

    public Integer getCarryProductsId() {
        return carryProductsId;
    }

    public void setCarryProductsId(Integer carryProductsId) {
        this.carryProductsId = carryProductsId;
    }

    public Integer getCarryPartsId() {
        return carryPartsId;
    }

    public void setCarryPartsId(Integer carryPartsId) {
        this.carryPartsId = carryPartsId;
    }

    public String getSpecNo() {
        return specNo;
    }

    public void setSpecNo(String specNo) {
        this.specNo = specNo;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodBarcode() {
        return goodBarcode;
    }

    public void setGoodBarcode(String goodBarcode) {
        this.goodBarcode = goodBarcode;
    }

    public String getGoodsCname() {
        return goodsCname;
    }

    public void setGoodsCname(String goodsCname) {
        this.goodsCname = goodsCname;
    }

    public String getGoodsEname() {
        return goodsEname;
    }

    public void setGoodsEname(String goodsEname) {
        this.goodsEname = goodsEname;
    }

    public String getGoodsCdesc() {
        return goodsCdesc;
    }

    public void setGoodsCdesc(String goodsCdesc) {
        this.goodsCdesc = goodsCdesc;
    }

    public String getGoodsEdesc() {
        return goodsEdesc;
    }

    public void setGoodsEdesc(String goodsEdesc) {
        this.goodsEdesc = goodsEdesc;
    }

    public BigDecimal getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(BigDecimal goodsNum) {
        this.goodsNum = goodsNum;
    }

    public BigDecimal getLastAmount() {
        return lastAmount;
    }

    public void setLastAmount(BigDecimal lastAmount) {
        this.lastAmount = lastAmount;
    }

    public String getGoodsUnit() {
        return goodsUnit;
    }

    public void setGoodsUnit(String goodsUnit) {
        this.goodsUnit = goodsUnit;
    }

    public String getGoodsSpec() {
        return goodsSpec;
    }

    public void setGoodsSpec(String goodsSpec) {
        this.goodsSpec = goodsSpec;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public BigDecimal getPiecesNum() {
        return piecesNum;
    }

    public void setPiecesNum(BigDecimal piecesNum) {
        this.piecesNum = piecesNum;
    }

    public BigDecimal getPerpiecesNum() {
        return perpiecesNum;
    }

    public void setPerpiecesNum(BigDecimal perpiecesNum) {
        this.perpiecesNum = perpiecesNum;
    }

    public BigDecimal getGoodsGross() {
        return goodsGross;
    }

    public void setGoodsGross(BigDecimal goodsGross) {
        this.goodsGross = goodsGross;
    }

    public BigDecimal getTotalGross() {
        return totalGross;
    }

    public void setTotalGross(BigDecimal totalGross) {
        this.totalGross = totalGross;
    }

    public BigDecimal getNetweight() {
        return netweight;
    }

    public void setNetweight(BigDecimal netweight) {
        this.netweight = netweight;
    }

    public BigDecimal getTotalnet() {
        return totalnet;
    }

    public void setTotalnet(BigDecimal totalnet) {
        this.totalnet = totalnet;
    }

    public BigDecimal getBulk() {
        return bulk;
    }

    public void setBulk(BigDecimal bulk) {
        this.bulk = bulk;
    }

    public BigDecimal getTotalBulk() {
        return totalBulk;
    }

    public void setTotalBulk(BigDecimal totalBulk) {
        this.totalBulk = totalBulk;
    }

    public BigDecimal getFunitprice() {
        return funitprice;
    }

    public void setFunitprice(BigDecimal funitprice) {
        this.funitprice = funitprice;
    }

    public BigDecimal getFtotalprice() {
        return ftotalprice;
    }

    public void setFtotalprice(BigDecimal ftotalprice) {
        this.ftotalprice = ftotalprice;
    }

    public BigDecimal getTrayNumber() {
        return trayNumber;
    }

    public void setTrayNumber(BigDecimal trayNumber) {
        this.trayNumber = trayNumber;
    }

    public BigDecimal getTotalTray() {
        return totalTray;
    }

    public void setTotalTray(BigDecimal totalTray) {
        this.totalTray = totalTray;
    }

    public String getStockNo() {
        return stockNo;
    }

    public void setStockNo(String stockNo) {
        this.stockNo = stockNo;
    }

    public String getSaleContractNo() {
        return saleContractNo;
    }

    public void setSaleContractNo(String saleContractNo) {
        this.saleContractNo = saleContractNo;
    }

    public String getClientContractNo() {
        return clientContractNo;
    }

    public void setClientContractNo(String clientContractNo) {
        this.clientContractNo = clientContractNo;
    }

    public String getSupplyerId() {
        return supplyerId;
    }

    public void setSupplyerId(String supplyerId) {
        this.supplyerId = supplyerId;
    }

    public String getSupplyerName() {
        return supplyerName;
    }

    public void setSupplyerName(String supplyerName) {
        this.supplyerName = supplyerName;
    }

    public Integer getProducttype() {
        return producttype;
    }

    public void setProducttype(Integer producttype) {
        this.producttype = producttype;
    }

    public String getHsCode() {
        return hsCode;
    }

    public void setHsCode(String hsCode) {
        this.hsCode = hsCode;
    }

    public String getBillGoodsCname() {
        return billGoodsCname;
    }

    public void setBillGoodsCname(String billGoodsCname) {
        this.billGoodsCname = billGoodsCname;
    }

    public String getBillGoodsEname() {
        return billGoodsEname;
    }

    public void setBillGoodsEname(String billGoodsEname) {
        this.billGoodsEname = billGoodsEname;
    }

    public String getHsMemo() {
        return hsMemo;
    }

    public void setHsMemo(String hsMemo) {
        this.hsMemo = hsMemo;
    }

    public BigDecimal getAddRate() {
        return addRate;
    }

    public void setAddRate(BigDecimal addRate) {
        this.addRate = addRate;
    }

    public BigDecimal getBackRate() {
        return backRate;
    }

    public void setBackRate(BigDecimal backRate) {
        this.backRate = backRate;
    }

    public BigDecimal getStockPrice() {
        return stockPrice;
    }

    public void setStockPrice(BigDecimal stockPrice) {
        this.stockPrice = stockPrice;
    }

    public BigDecimal getDeclarePrice() {
        return declarePrice;
    }

    public void setDeclarePrice(BigDecimal declarePrice) {
        this.declarePrice = declarePrice;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getOuterLenght() {
        return outerLenght;
    }

    public void setOuterLenght(BigDecimal outerLenght) {
        this.outerLenght = outerLenght;
    }

    public BigDecimal getOuterWidth() {
        return outerWidth;
    }

    public void setOuterWidth(BigDecimal outerWidth) {
        this.outerWidth = outerWidth;
    }

    public BigDecimal getOuterHeight() {
        return outerHeight;
    }

    public void setOuterHeight(BigDecimal outerHeight) {
        this.outerHeight = outerHeight;
    }

    public BigDecimal getOuterPiece() {
        return outerPiece;
    }

    public void setOuterPiece(BigDecimal outerPiece) {
        this.outerPiece = outerPiece;
    }

    public String getOuterPackageUnit() {
        return outerPackageUnit;
    }

    public void setOuterPackageUnit(String outerPackageUnit) {
        this.outerPackageUnit = outerPackageUnit;
    }
}